var dns=require('dns');

dns.lookup('www.github.com',function onLookUp(err,addr,family)
{
    console.log('ip addr :',addr);
    dns.reverse(addr,function(err,hostnames)
    {
        if(err)
            console.log(err.stack);
        console.log('反向解析'+addr+':'+JSON.stringify(hostnames));
    });

});